<div class="box-body">
    <form class="layui-form" action="{:url('system/platform/save')}" method="post" lay-filter="platform-form">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">平台名称</label>
            <div class="layui-input-block">
                <input type="text" lay-verify="required" lay-reqText="平台名称不能为空" name="name" {if isset($platform)}value="{$platform.name}"{/if} placeholder="平台名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">中文名</label>
            <div class="layui-input-block">
                <input type="text" name="name_ch" {if isset($platform)}value="{$platform.name_ch}"{/if} placeholder="平台中文名" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">平台代码</label>
            <div class="layui-input-block">
                <input type="text" name="code" {if isset($platform)}value="{$platform.code}"{/if} placeholder="平台代码, 三个字母" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">平台官网</label>
            <div class="layui-input-block">
                <input type="text" name="site" {if isset($platform)}value="{$platform.site}"{/if} placeholder="平台官网" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">api根路径</label>
            <div class="layui-input-block">
                <input type="text" name="api_base_url" {if isset($platform)}value="{$platform.api_base_url}"{/if} placeholder="对接平台api根路径" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">开发文档链接</label>
            <div class="layui-input-block">
                <input type="text" name="develop_url" {if isset($platform)}value="{$platform.develop_url}"{/if} placeholder="对接文档路径" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">对接类</label>
            <div class="layui-input-block">
                <select name="classes" lay-search>
                    <option value="">请选择</option>
                    {foreach $service as $s}
                    <option {if isset($platform) && $platform.classes==$s}selected{/if} value="{$s}">{$s}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" name="sort" {if isset($platform)}value="{$platform.sort}"{/if}laceholder="排序" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" name="remark" {if isset($platform)}value="{$platform.remark}"{/if} placeholder="备注说明" class="layui-input">
            </div>
        </div>
        {if isset($platform)}
        <input type="hidden" name="platform_id" value="{$platform.platform_id}"/>
        {/if}
    </form>
</div>
